package com.atos.smp.actions;

import javax.faces.bean.ManagedBean;
import javax.faces.model.SelectItem;

import com.atos.smp.beans.Rule;

@ManagedBean
public class RuleBean {
	
	public SelectItem[] getRuleValues() {
		SelectItem[] items = new SelectItem[Rule.values().length-1];
		int i = 0;
		for (Rule r : Rule.values()) {
			if(!r.equals(Rule.ADMIN))
				items[i++] = new SelectItem(r, r.getLabel());
		}
		return items;
	}
}
